package com.visionvera.myapplication.net;

import android.content.Context;

import com.visionvera.retrofitservice.net.BaseObserver;

/**
 * Created by Qiao on 2016/12/22.
 */

public abstract class ResponseSubscriber<T> extends BaseObserver {

    public ResponseSubscriber(Context context) {
        super(context);
    }

    public ResponseSubscriber(Context context, String msg) {
        super(context);
    }

    public ResponseSubscriber(Context context, boolean isShowLoading) {
        super(context);
    }

    @Override
    public void onError(Throwable e) {
//        if (e instanceof HttpException && ((HttpException) e).code() == HttpURLConnection.HTTP_UNAUTHORIZED) {
//            ToastUtil.showToast("您在异地登录，您被迫退出登录");
//            UserHelper.logout();
//        } else {
//            super.onError(e);
//        }
    }
}
